home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_313 / uucp / uucp1.lzh / src / uucico / uuname.c < prev    next >
C/C++ Source or Header  |  1990-01-25  |  675b  |  42 lines

  1.  
  2. /*
  3.    UUHOSTS  -- List all UUCP sites connected to our system
  4.  
  5.    Usage: UUHOSTS
  6.  
  7.    Copyright 1988 by William Loftus.  All rights reserved.
  8.  
  9.    ARPA: wpl@prc.unisys.com
  10.    UUCP: wpl@burdvax.UUCP
  11.    USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
  12.  
  13. */
  14.  
  15. #include <stdio.h>
  16. #include "/version.h"
  17.  
  18. IDENT(".00");
  19.  
  20. void
  21. main()
  22. {
  23.     char buf[256];
  24.     FILE *fd;
  25.  
  26.     if (!(fd = fopen("UULIB:L.sys", "r"))) {
  27.     printf("Couldn't open UULIB:L.sys file\n");
  28.     exit(1);
  29.     }
  30.  
  31.     while (fgets(buf, sizeof buf, fd)) {
  32.     if (buf[0] == '#' || buf[0] == '\n')
  33.         continue;
  34.     buf[(int)strchr(buf,' ') - (int)buf] = '\0';
  35.     printf("%s\n", buf);
  36.     }
  37.  
  38.     fclose(fd);
  39. }
  40.  
  41.  
  42.